package com.qishi.exampleFour;


import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;

//前置增强
public class GreetingBeforeAdvice implements MethodBeforeAdvice {


    public void before(Method method, Object[] args, Object o) throws Throwable {

        //输出切点
        System.out.println(o.getClass().getName()+"."+method.getName());

        String clientName = (String)args[0];
        System.out.println("How are you! Mr."+clientName+".");
    }
}
